#include "mywidget.h"
#include "ui_mywidget.h"
#include <QMediaPlayer>

MyWidget::MyWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::MyWidget)
{
    ui->setupUi(this);

    QMediaPlayer *player = new QMediaPlayer;
    player->setMedia(QUrl("qrc:/nfgn.mp3"));
    player->setVolume(100);
    connect(ui->playBtn, &QPushButton::clicked, [=]() {
        player->play();
    });

}

MyWidget::~MyWidget()
{
    delete ui;
}

